var keystone = require('keystone');
var Types = keystone.Field.Types;
/**
 * Group Model
 * ==================
 */

var UserGroup = new keystone.List('UserGroup', {});

UserGroup.add({
    name: {type: String, required: true},
    status: {type: Types.Select, options: 'used, disable, delete', default: 'used'},
    // author: {type: Types.Relationship, ref: 'User', many: true},
    //权限
    permissions: {type: String, required: false}
});

UserGroup.relationship({ref: 'User', refPath: 'userGroup', path: 'users',});
UserGroup.register();
